# 导包
from datetime import date
from datetime import datetime
from datetime import time
from datetime import timedelta

print(date.max)
print(date.min)

now = date.today()
print(now.year, now.month, now.day)

n2 = datetime.now()
print(n2.date())
print(n2.time())
print(n2.year, n2.month, n2.day, \
      n2.hour, n2.minute, n2.second)

a = date(2020, 3, 19)
b = date(2020, 3, 22)
c = datetime(2020, 3, 19, 16, 3, 6)
d = time(18, 12, 5)
print(a, b, c, d)

print(a>b)
print(a==b)
print(a<b)
print(a.__gt__(b))
print(a.__eq__(b))
print(a.__lt__(b))

print(a-b)
gap = a-b
print(gap.days)
print(gap.seconds)

threeDayBefor = a-timedelta(days=3)
print(threeDayBefor)
threeDayAfter = a+timedelta(days=3)
print(threeDayAfter)
